import datetime

# 设置上课或下课的时间点
class_time = [
    datetime.time(7, 30, 0),
    datetime.time(8, 20, 0),
    datetime.time(8, 30, 0),
    datetime.time(9, 15, 0),
    datetime.time(9, 25, 0),
    datetime.time(10, 10, 0),
    datetime.time(10, 20, 0),
    datetime.time(11, 5, 0),
    datetime.time(11, 15, 0),
    datetime.time(12, 0, 0),
    datetime.time(13, 50, 0),
    datetime.time(14, 35, 0),
    datetime.time(14, 45, 0),
    datetime.time(15, 30, 0),
    datetime.time(15, 40, 0),
    datetime.time(16, 25, 0),
    datetime.time(16, 35, 0),
    datetime.time(17, 20, 0),
    datetime.time(18, 30, 0),
    datetime.time(19, 15, 0),
    datetime.time(19, 25, 0),
    datetime.time(20, 10, 0),
    datetime.time(20, 20, 0),
    datetime.time(21, 30, 0),
]

# 当前时间
now = datetime.datetime.now()

# 计算距离下一个上课或下课时间点的时间差
for class_time in class_time:
    next_time = datetime.datetime.combine(now.date(), class_time)
    if next_time > now:
        print('距离下一个 {} 时间点还有 {}'.format(class_time, next_time - now))
        break